package com.basejace.core.interceptors;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.log.Log;

/**
 * 判断客户端请求的url在action中的方法执行时间
 * @author admin
 *
 */
public class RequestLogInterceptor implements Interceptor {
	protected Log log = Log.getLog(this.getClass());
	
	public void intercept(Invocation inv) {
		long begtime = System.currentTimeMillis();
		inv.invoke();
		log.info("T[" + (System.currentTimeMillis()-begtime) + "] url:" + inv.getActionKey());
	}

	
}
